// const obj = {
//     name: 'test',
//     fn1: function () { console.log(this.name) },
//     fn2: () => { console.log(this) }
// }
// obj.fn1()
// obj.fn2()


const obj = {
    name: 'lisi',
    fn1: function () {
        setTimeout(function () {
            console.log(this.name)
        })
    },
    fn2: function(){
        setTimeout(() => {
            console.log(this.name)
        })
    }
}
obj.fn1()
obj.fn2()